﻿// =====================================================================
// <copyright file="ResourceManager.cs" author="David R. Guindo">
// 	Copyright (C) 2014. All rights reserved.
// </copyright>
// =====================================================================
// This code is released under the terms of the Apache 2.0 license, 
// http://apache.org/licenses/LICENSE-2.0.html
// =====================================================================

namespace AppBlock.Core
{
    using System.Resources;

    public class ResxManager<TResource> : ResourceManager
    {
        public ResxManager() : this(typeof (TResource).FullName)
        {
        }

        public ResxManager(string name) : base(name, typeof (TResource).Assembly)
        {
        }

        public string GetPluralString(string name)
        {
            return TextHelper.Pluralize(base.GetString(name));
        }
    }
}